package dl.domainmodel.service;

import dl.common.service.iface.ProductServiceInterface;
import dl.domainmodel.factory.ProductFactory;
import dl.domainmodel.model.Product;
import dl.exception.handler.ApplicationException;

public class ProductService implements ProductServiceInterface {

	@Override
	public long insertProductInformation(String productName, String productType)
			throws ApplicationException {
		return Product.save(ProductFactory.getProductSpecifier(productType)
				.getRightProduct(productName));
	}

	@Override
	public void deleteProductInformation(long id) throws ApplicationException {
		Product.delete(id);
	}

}
